{% extends 'frontend/base/index.html' %}
{% block seo %}
    <title>{{ result.name }}</title>
    <meta name="keywords" content="{{ result.keywords }}">
    <meta name="description" content="{{ result.description }}">
{% endblock %}
{% block position %}
    <section class="ng-navbar">
        <div class="container">
            <div class="row">
                <div class="col-xs-12">
                    <ol class="breadcrumb">
                        <li><a href="/">首页</a></li>
                        <li class="active">{{ result.name }}</li>
                    </ol>
                </div>
            </div>
        </div>
    </section>
{% endblock %}
{% block main %}
    <div class="col-xs-12 col-sm-9">
        <div class="main-item media">
            <div class="media-left media-middle hidden-xs">
                <a href="">
                    <img src="http://img.guohongfu.top/20190829154149.jpg" alt="" class="media-object"
                         style="height: 150px">
                </a>
            </div>
            <div class="media-body">
                <h3><a href="{{ url_for('frontend.frontend_post_details',title=result.title) }}">{{ result.name }}</a>
                </h3>
                <span class="pull-left"><i class="iconfont">&#xe8eb;</i></span>
                <ul class="list-inline">
                    {{ result.keywords|getTags|safe }}
                </ul>
                <a href="" class="hidden-lg hidden-md">
                    <img src="http://img.guohongfu.top/20190829154149.jpg" alt="" class="media-object"
                         style="height: 150px">
                </a>
                <p>
                    {{ result.description }}
                </p>
            </div>
        </div>
        <div class="main-item">
            <div class="content">
                <div id="test-editormd-view" class="markdown-body editormd-html-preview">
                    {{ result.markdown_html_code|safe }}
                </div>
                <hr>
                <div>
                    <span>参考文献</span>
                    <br>
                    {{ result.references|safe }}
                </div>
            </div>
        </div>
        <div class="main-item">
            <p><strong>上一篇 </strong><span>{{ result.id|prevPost|safe }}</span>
            </p>
            <p><strong>下一篇 </strong><span>{{ result.id|nextPost|safe }}</span></p>
        </div>
        <div class="main-item">
            <h2 class="main-title"><span>相关文章</span></h2>
            <ul class="article-list">
                {#                <li><a href="#">a;skdfj;askdjf;aksjda</a></li>#}
            </ul>
        </div>
        {#<div class="main-item">
            <h2 class="main-title"><span>评论</span></h2>
            <ul class="article-list">
                <form method="post" id="form_data" class="form form-horizontal">
                    <div class="form-group">
                        {{ form.body }}
                        <input type="hidden" name="user_id" value="">
                    </div>
                    {{ form.csrf_token }}
                    {{ form.submit }}
                </form>
            </ul>
        </div>#}
        {#<div class="main-item">
            <h2 class="main-title"><span>评论列表</span></h2>
            <ul class="article-list">

            </ul>
        </div>#}
    </div>
{% endblock %}
{% block script %}
    <script>
        $("p img").addClass("img-responsive");
    </script>
{% endblock %}